<link rel="stylesheet" href="{{ url_for('static', filename='compute/static/codemirror/codemirror.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='compute/static/codemirror/theme/ayu-dark.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='compute/static/codemirror/theme/seti.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='/compute/static/layui-v2.6.8/layui/css/layui.css') }}">
<script src="{{ url_for('static', filename='compute/static/codemirror/codemirror.js') }}"></script>
<script src="{{ url_for('static', filename='compute/static/codemirror/mode/yaml/yaml.js') }}"></script>
<article class="post">
  <header>
    <div class= "layui-font-16" style="padding: 10px 5px 0px 10px">
      <a href="../new/{{posts['type']}}s"><i class="layui-icon layui-icon-return" style="font-size: large; color: white;" ></i></a>
      <a style="font-size: large; color: white;">详情</a>
    </div>
    <div style="color: #fff; padding: 10px 10px; font-size: 30px">{{posts["type"]}}: {{posts["name"]}}</div>
    <div>
      <textarea id="code" name="code">{{ posts["data"] }}</textarea>
    </div>
  </header>
</article>
<script type="text/javascript">

  var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
    mode: "text/yaml",
    theme: "ayu-dark",
    lineNumbers: true,
    // tabSize: 1,
    readOnly: false,
    lineWrapping: true,
    // gutters: ["CodeMirror-lint-markers"],
  });
  // set the width & height of the codemirror editor
  editor.setSize("100%", "80%");
</script>


